package com.zjp.mg.auditorAware;


import com.github.javafaker.Faker;
import org.springframework.data.domain.AuditorAware;

import java.util.Locale;
import java.util.Optional;


//@Component
public class CurrentUserInfo implements AuditorAware<String> {

    @Override
    public Optional<String> getCurrentAuditor() {
        Faker faker = new Faker(Locale.CHINA);
        return Optional.of(faker.name().name());
    }
}
